<template>
  <div>
    <div class="swiper-container">
      <div class="swiper-wrapper">
        <div v-for="(item, index) in list" :key="index" class="swiper-slide">
          <img :src="item.pic" alt="" />
          <span class="move_a animate__animated animate__fadeInUpBig wow">
            {{ item.title }}
          </span>
          <p class="move_b animate__animated animate__fadeInUpBig wow">
            {{ item.dateil }}
          </p>
          <button class="move_c animate__animated animate__fadeInUpBig wow">
            了解我们
          </button>
        </div>
      </div>
      <!-- 如果需要分页器 -->
      <div class="swiper-pagination"></div>

      <!-- 如果需要导航按钮 -->
      <div class="swiper-button-prev"></div>
      <div class="swiper-button-next"></div>

      <!-- 如果需要滚动条 -->
      <!-- <div class="swiper-scrollbar"></div> -->
    </div>
    <div class="bransh">
      <div class="bransh_div">
        <div class="bransh_first animate__animated animate__fadeInRight wow">
          <img src="../../assets/img/header-footer/LOGO-1-1.png" alt="" />
        </div>
        <div class="bransh_last animate__animated animate__fadeInLeft wow">
          <span>港记甜品</span>
          <p>
            港记甜品创始于90年代的香港，发展于2011年，同年港记甜品负责深圳满记甜品福建市场。在2017年对品牌及文化进行升级是第三代港式甜品的新形象。在保留经典港式甜品的基础上做出产品改进，坚持“手捧圆满幸福”的产品理念和“清新、年轻、时尚”的品牌形象，致力于深度挖掘香港的港式水果甜品原文化为依托，把香飘港粤两岸的甜品文化带进国内市场。创新、期望、温暖是港记甜品独特的个性，丰富的主营系列辅以多款创意单品，将美味与新鲜、健康、自然完美融合，用心制作年轻人喜欢的健康美味甜品。
          </p>
        </div>
      </div>
    </div>
    <div class="container">
      <div class="container_first animate__animated animate__bounceInDown wow">
        <p>甜点是我见过最荡气回肠的情书</p>
      </div>
      <div class="container_last">
        <div
          class="container_last_div animate__animated animate__slideInUp wow"
          v-for="(item, index) in ment"
          :key="index"
        >
          <img :src="item.pic" alt="" />
          <p>{{ item.title }}</p>
        </div>
      </div>
    </div>
    <div class="section">
      <div class="section_div">
        <p>我们一直谨从以心调配，坚持手造圆满幸福的理念</p>
        <span
          >严选优质、时令的食材，结合新颖、巧妙的意念，透过认真、细致的亨煮，奉上滋味、暖心的甜品。</span
        >
      </div>
    </div>
    <div class="holder">
      <div class="holder_div">
        <div
          class="holder_div_first animate__animated animate__fadeInUp wow"
          v-for="(item, index) in caption"
          :key="index"
        >
          <div class="holder_div_first_one">
            <img :src="item.pic" alt="" class="imga" />
            <div class="mask">
              <p><img src="../../assets/img/index/plus.png" alt="" /></p>
            </div>
          </div>
          <span>{{ item.title }}</span>
          <p>{{ item.detail }}</p>
        </div>
        <div class="holder_button">
          <button>查看更多</button>
        </div>
      </div>
    </div>
    <div class="writing">
      <div class="writing_div">
        <div class="writing_div_first"  v-for="(item,index) in valid" :key="index">
          <p v-change>{{item.title}}</p>
          <span>{{item.detail}}</span>
        </div>
      </div>
    </div>
    <div class="fluid">
      <div class="fluid_first">
        <div class="fluid_first_div">
          <div class="fluid_A animate__animated animate__fadeInRight wow">
            <img src="../../assets/img/index/tj-1-1.jpg" alt="">
          </div>
          <div class="fluid_B animate__animated animate__fadeInLeft wow">
            <span>芒果班戟</span>
            <p>芒果班戟是一道甜品，班戟是pancake（松饼）的粤语音译，但经过香港人的改良之后，已经和原来的pancake有了很大的差异，成为一道“中国化”的甜品。<br><br>班戟除了各种不同的美味馅儿以外，人们同样非常喜爱它既薄又具有Q劲儿的表皮。制作班戟的时候，最主要的功夫，也花在这皮上了，只要皮做好了，搭配上鲜奶油和水果的馅儿，怎么都不会难吃。对于这种甜品，尤其喜欢榴莲的人，估计想要拒绝它，很难。</p>
          </div>
        </div>
      </div>
    </div>
    <div class="parallax">
      <div class="parallax_div">
        <div class="parallax_div_first">
          <strong>产品款式我们追求更好——严选优质，手奉圆满幸福</strong>
          <p>港记甜品以连锁式甜品店经营并于万达系统备案，开店流程简便。门店销售多款自制冷热甜品，有传统广式糖水，种类繁多，口味新颖的人手调配。自创和由食客启发各式甜品共计100余款，款款精心制造，品质追求至上，备受各阶层食客欢迎，亦是甜品控的挚爱。单店单月营业额最高超80万人民币。</p>
          <span>我们一直谨从以心调配，坚持手造圆满幸福的理念，严选优质、时令的食材，结合新颖、巧妙的意念，透过认真、细致的亨煮，奉上滋味、暖心的甜品。</span>
        </div>
      </div>
    </div>
    <Conter></Conter>
    <footerTop></footerTop>
  </div>
</template>

<script>
import Swiper from "swiper";
import "swiper/css/swiper.min.css";
import "animate.css";
import WOW from "wowjs";
import Conter from "@/components/container/grid.vue"
import footerTop from "@/components/container/FooterTop.vue";
export default {
  data() {
    return {
      list: [
        {
          pic: require("../../assets/img/attract/home-1-1.jpg"),
          title:
            "希望你披着柔媒的阳光尝遍略带着甜意的温柔愿你在微风里沉醉在甜味中里醒来",
          dateil:
            "I hope you under the soft sunshine taste with sweet Italian, let you indulge in the gentle breeze, in the wake of sweetness in.",
        },
        {
          pic: require("../../assets/img/attract/home-2.jpg"),
          title: "甜点是我最荡气回肠的情书",
          dateil: "Dessert is the best I have seen the letter Dangqi ileum",
        },
      ],
      ment: [
        { pic: require("../../assets/img/index/tj-1.png"), title: "杨枝甘露系列" },
        { pic: require("../../assets/img/index/tj-2.png"), title: "榴莲系列" },
        { pic: require("../../assets/img/index/tj-3.png"), title: "精致糕点系列" },
        { pic: require("../../assets/img/index/tj-4.png"), title: "白雪汁系列" },
      ],
      caption: [
        {
          pic: require("../../assets/img/index/CP-4.jpg"),
          title: "芒果班戟",
          detail: "精致糕点",
        },
        {
          pic: require("../../assets/img/index/CP-2.jpg"),
          title: "楊枝甘露",
          detail: "西米露系列",
        },
        {
          pic: require("../../assets/img/index/CP-3.jpg"),
          title: "白雪黑珍珠",
          detail: "西米露系列",
        },
        {
          pic: require("../../assets/img/index/CP-1.jpg"),
          title: "西瓜西米露",
          detail: "西米露系列",
        },
        {
          pic: require("../../assets/img/index/CP-6.jpg"),
          title: "糖不甩",
          detail: "汤圆系列",
        },
        {
          pic: require("../../assets/img/index/CP-7.jpg"),
          title: "芒果豆花",
          detail: "豆腐花系列",
        },
      ],
      valid: [
        { title: 19, detail: "芒果班戟" },
        { title: 19, detail: "雪山杨枝甘露" },
        { title: 16, detail: "杨枝甘露" },
        { title: 15, detail: "白雪黑珍珠" },
      ],
    };
  },
  mounted() {
    var mySwiper = new Swiper(".swiper-container", {
      autoplay: true, //开启动画切换效果
      // direction: "vertical", // 垂直切换选项
      loop: true, // 循环模式选项

      // 如果需要分页器
      pagination: {
        el: ".swiper-pagination",
      },

      // 如果需要前进后退按钮
      navigation: {
        nextEl: ".swiper-button-next",
        prevEl: ".swiper-button-prev",
      },
    });
    //鼠标移出隐藏按钮，移入显示按钮
    mySwiper.el.onmouseover = function () {
      mySwiper.navigation.$nextEl.removeClass("hide");
      mySwiper.navigation.$prevEl.removeClass("hide");
    };
    mySwiper.el.onmouseout = function () {
      mySwiper.navigation.$nextEl.addClass("hide");
      mySwiper.navigation.$prevEl.addClass("hide");
    };
    new WOW.WOW().init(); //初始化wowjs
  },
  components: {
    Conter,
    footerTop
  },
};
</script>

<style lang="scss" scoped>
::v-deep .swiper-container {
  // --swiper-theme-color: #ff6600;
  --swiper-pagination-color: #f0f0f0; /* 两种都可以 */
  width: 100%;
  height: 570px;

  .swiper-wrapper {
    .swiper-slide {
      display: flex;
      justify-content: center;
      img {
        width: 100%;
        height: auto;
        max-height: 100%;
        object-fit: cover;
        background-size: contain;
      }
      .move_a {
        width: 580px;
        height: 80px;
        position: absolute;
        top: 163px;
        text-align: center;
        color: #f0f0f0;
        font-size: 30px;
        line-height: 45px;
      }
      .move_b {
        width: 570px;
        position: absolute;
        color: #f0f0f0;
        font-family: "Comic Sans MS";
        font-size: 19px;
        top: 280px;
        text-align: center;
      }
      .move_c {
        position: absolute;
        width: 100px;
        height: 33px;
        position: absolute;
        background-color: #7a5b4a;
        color: #f0f0f0;
        top: 400px;
        font-size: 12px;
        &:hover {
          background-color: #f0f0f0;
          color: #86909c;
          font-size: 12px;
        }
      }
    }
  }
}
.animate__animated.animate__fadeInUpBig {
  --animate-duration: 1s;
}
:root {
  --animate-duration: 800ms;
  --animate-delay: 0.9s;
}
::v-deep .swiper-container .hide {
  opacity: 0;
  .swiper-button-next,
  .swiper-button-prev {
    transition: opacity 0.5s;
  }
}
.bransh {
  width: 100%;
  height: 357px;
  background-color: #f0f0f0;
  padding: 40px 0;
  .bransh_div {
    width: 1300px;
    height: 318px;
    margin: 0 auto;
    display: flex;
    .bransh_first {
      width: 330px;
      height: 318px;
      padding: 35px;
      display: flex;
      justify-content: center;
      img {
        width: 200px;
        height: 200px;
        display: block;
        line-height: 318px;
        margin: 15px 0;
      }
    }
    .bransh_last {
      width: 970px;
      padding: 25px 30px;
      display: flex;
      flex-direction: column;
      span {
        font-size: 30px;
        font-weight: bold;
        text-align: center;
        margin-bottom: 25px;
      }
      p {
        font-size: 18px;
        line-height: 32px;
        font-family: "Open Sans", sans-serif;
        color: #666666;
        font-weight: 300;
      }
    }
  }
}
.container {
  width: 1550px;
  height: 620px;
  background: url("../../assets/img/index/sybj-2.jpg");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: 50% 20px;
  margin: 0 auto;
  .container_first {
    text-align: center;
    padding-top: 80px;
    padding-bottom: 40px;
    p {
      font-size: 30px;
      font-weight: bold;
      color: #f0f0f0;
    }
  }
  .container_last {
    width: 1330px;
    height: 408px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    .container_last_div {
      width: 332px;
      height: 408px;
      padding: 0 15px;
      img {
        width: 302px;
        height: 302px;
      }
      p {
        text-align: center;
        color: #f0f0f0;
        font-size: 18px;
        font-weight: bold;
        margin-top: 50px;
        margin-bottom: 32px;
      }
    }
  }
}
.section {
  width: 100%;
  height: 200px;
  text-align: center;
  padding-top: 65px;
  padding-bottom: 50px;
  .section_div {
    p {
      font-size: 30px;
      font-weight: 300;
      display: block;
    }
    span {
      margin-top: 10px;
      font-size: 18px;
      font-weight: 300;
      display: block;
    }
  }
}
// holder下的代码很重要
.holder {
  width: 100%;
  height: 1325px;
  padding-bottom: 59px;
  .holder_div {
    width: 1300px;
    margin: 0 auto;
    display: flex;
    // 弹性布局换行
    flex-flow: wrap;
    .holder_div_first {
      width: 433px;
      height: 605px;
      padding: 0 7px;
      .holder_div_first_one {
        position: relative;
        width: 419px;
        height: 503px;
        // 设置遮罩层子绝父相
        overflow: hidden;
        .mask {
          position: absolute;
          width: 100%;
          height: 100%;
          background-color: rgba(0, 0, 0, 0.6);
          top: 0;
          left: 0;
          display: none;
          p {
            position: absolute;
            width: 45px;
            height: 45px;
            border-radius: 50%;
            border: 1px solid #f0f0f0;
            display: flex;
            justify-content: center;
            top: 45%;
            left: 45%;
            img {
              position: absolute;
              width: 20px;
              height: 20px;
              margin-top: 28%;
            }
            &:hover {
              background-color: #7a5b4a;
              border: none;
            }
          }
        }
        &:hover .mask {
          display: block;
        }
        &:hover .imga {
          animation: zhuan 1.5s infinite linear;
          @keyframes zhuan {
            0% {
              transform: rotate(0) scale(1);
            }
            50% {
              transform: rotate(-15deg) scale(1.5);
            }
            100% {
              transform: rotate(0) scale(1);
            }
          }
        }
        .imga {
          width: 419px;
          height: 503px;
        }
      }

      span {
        margin-top: 20px;
        font-size: 18px;
        font-weight: 300;
        display: block;
        text-align: center;
        color: #333333;
        &:hover {
          color: #666666;
        }
      }
      p {
        margin-top: 10px;
        font-size: 13px;
        text-align: center;
        font-family: "Open Sans", sans-serif;
        color: #666666;
        // font-weight: bold;
      }
    }
    .holder_button {
      width: 100%;
      text-align: center;
      margin-top: 15px;
      button {
        width: 100px;
        height: 41px;
        background-color: #7a5b4a;
        color: #f0f0f0;
        &:hover {
          color: #7a5b4a;
          background-color: #fff;
          border: 1px solid #7a5b4a;
        }
      }
    }
  }
}
.writing {
  width: 1550px;
  height: 300px;
  margin: 0 auto;
  background: url("../../assets/img/index/1-5.jpg");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: 50% 20px;
  .writing_div {
    width: 1300px;
    height: 247px;
    margin: 0 auto;
    display: flex;
    .writing_div_first {
      width: 332px;
      text-align: center;
      margin-top: 80px;
      color: black;
      p {
        font-size: 50px;
        font-family: "Open Sans", sans-serif;
      }
      span {
        font-size: 18px;
      }
    }
  }
}
.fluid{
  width: 100%;
  height: 600px;
  background-color: #f6f6f6;
  padding-top: 85px;
  padding-bottom: 100px;
  .fluid_first{
    width: 100%;
    height: 415px;
    .fluid_first_div{
      width: 1330px;
      height: 415px;
      margin: 0 auto;
      display: flex;
      .fluid_A{
        width: 665px;
        height: 415px;
        padding: 0 82.5px;
        img{
          width: 500px;
          height: 400px;
          box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }
      }
      .fluid_B{
        width: 665px;
        display: flex;
        flex-direction: column;
        span{
          width: 100%;
          text-align: center;
          font-size: 30px;
          font-weight: bold;
          padding-top: 50px;
          padding-bottom: 25px;
        }
        p{
          font-size: 18px;
          line-height: 32px;
          font-weight: 300;
        }
      }
    }
  }
}
.parallax{
  width: 100%;
  height: 400px;
  .parallax_div{
    width: 1550px;
    height: 400px;
    margin: 0 auto;
    background: url('../../assets/img/index/1-6-2.jpg');
    background-size:100% 100%;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: 50% 20px;
    padding-top: 80px;
    .parallax_div_first{
      width: 1330px;
      height: 290px;
      margin: 0 auto;
      strong{
        display: block;
        font-size: 30px;
        text-align: center;
        margin-bottom:50px;
      }
      p{
        display: block;
        font-size: 18px;
        line-height: 30px;
        margin-bottom: 30px;
        text-align: center;
        font-weight: 200;
      }
      span:last-child{
        display: block;
        font-size: 18px;
        font-weight: 200;
        text-align: center;
      }
    }
  }
}

</style>
